import Vue from 'vue'
import Router from 'vue-router'
import store from '../store'

// import Index from '@/components/index/index'
// import Find from '@/components/find/find'
// import Order from '@/components/order/order'
// import Mine from '@/components/mine/mine'
// import RestaurantDetail from '@/components/index/restaurant-detail/restaurant-detail'
// import RestaurantList from '@/components/index/restaurant-list/restaurant-list'
// import Goods from '@/components/index/restaurant-detail/goods/goods'
// import Ratings from '@/components/index/restaurant-detail/ratings/ratings'
// import Seller from '@/components/index/restaurant-detail/seller/seller'
// import login from '@/components/login/login'

Vue.use(Router)

// 路由懒加载
/* const ChoiceCity = (resolve) => {
  import('@/components/choice-city/choice-city').then((module) => {
    resolve(module)
  })
} */
const Search = (resolve) => {
  import('@/components/base/search/search').then((module) => {
    resolve(module)
  })
}
const Brand = (resolve) => {
  import('@/components/base/brand/brand').then((module) => {
    resolve(module)
  })
}
const Filter = (resolve) => {
  import('@/components/filter/filterScroll').then((module) => {
    resolve(module)
  })
}
const CarSeries = (resolve) => {
  import('@/components/filter/models-offer/car-series/car-series').then((module) => {
    resolve(module)
  })
}
/* const Index = (resolve) => {
  import('@/components/index/index').then((module) => {
    resolve(module)
  })
} */
const Find = (resolve) => {
  import('@/components/car-info/find/find').then((module) => {
    resolve(module)
  })
}
const CarInfo = (resolve) => {
  import('@/components/car-info/car-info').then((module) => {
    resolve(module)
  })
}
const LoanInfo = (resolve) => {
  import('@/components/min/loan-info/loan-info').then((module) => {
    resolve(module)
  })
}
const LoanInfoLook = (resolve) => {
  import('@/components/min/loan-info/loan-info-look').then((module) => {
    resolve(module)
  })
}
const Clause = (resolve) => {
  import('@/components/min/clause/clause').then((module) => {
    resolve(module)
  })
}
const ConfirmClause = (resolve) => {
  import('@/components/base/confirm-clause/confirm-clause').then((module) => {
    resolve(module)
  })
}

/* const RestaurantDetail = (resolve) => {
  import('@/components/index/restaurant-detail/restaurant-detail').then((module) => {
    resolve(module)
  })
} */
/* const RestaurantList = (resolve) => {
  import('@/components/index/restaurant-list/restaurant-list').then((module) => {
    resolve(module)
  })
} */
/* const Goods = (resolve) => {
  import('@/components/index/restaurant-detail/goods/goods').then((module) => {
    resolve(module)
  })
} */
/* const Ratings = (resolve) => {
  import('@/components/index/restaurant-detail/ratings/ratings').then((module) => {
    resolve(module)
  })
} */
/* const Seller = (resolve) => {
  import('@/components/index/restaurant-detail/seller/seller').then((module) => {
    resolve(module)
  })
} */
const login = (resolve) => {
  import('@/components/min/auth/login').then((module) => {
    resolve(module)
  })
}
const Home = (resolve) => {
  import('@/components/home/home').then((module) => {
    resolve(module)
  })
}
const Maps = (resolve) => {
  import('@/components/base/maps/maps').then((module) => {
    resolve(module)
  })
}
const Guide = (resolve) => {
  import('@/components/guide/guide').then((module) => {
    resolve(module)
  })
}
const About = (resolve) => {
  import('@/components/min/about/about').then((module) => {
    resolve(module)
  })
}
const AboutOur = (resolve) => {
  import('@/components/min/about-our/about-our').then((module) => {
    resolve(module)
  })
}
const OftenQuestion = (resolve) => {
  import('@/components/often-question/often-question').then((module) => {
    resolve(module)
  })
}
const AboutApp = (resolve) => {
  import('@/components/often-question/about-app/index').then((module) => {
    resolve(module)
  })
}
const AboutUpai = (resolve) => {
  import('@/components/often-question/about-upai/index').then((module) => {
    resolve(module)
  })
}
const Ccrowdorder = (resolve) => {
  import('@/components/often-question/about-crowdorder/index').then((module) => {
    resolve(module)
  })
}
const LoanClient = (resolve) => {
  import('@/components/often-question/loan-client/index').then((module) => {
    resolve(module)
  })
}
const BigBangClient = (resolve) => {
  import('@/components/often-question/bigBang-client/index').then((module) => {
    resolve(module)
  })
}
const Forget = (resolve) => {
  import('@/components/min/auth/forget').then((module) => {
    resolve(module)
  })
}

const ModelsOffer = (resolve) => {
  import('@/components/filter/models-offer/model-offer').then((module) => {
    resolve(module)
  })
}

const BarCode = (resolve) => {
  import('@/components/base/bar-code/bar-code').then((module) => {
    resolve(module)
  })
}

/* const Product = (resolve) => {
  import('@/components/product/index').then((module) => {
    resolve(module)
  })
} */

// 新的我的页面
const Min = (resolve) => {
  import('@/components/min/min').then((module) => {
    resolve(module)
  })
}
// 车型配置
const CarDetailes = (resolve) => {
  import('@/components/filter/models-offer/car-details/car-details').then((module) => {
    resolve(module)
  })
}
// 关注车型
const Attention = (resolve) => {
  import('@/components/base/attention/attention').then((module) => {
    resolve(module)
  })
}
// 新关注车型
const Attent = (resolve) => {
  import('@/components/base/attention/attent').then((module) => {
    resolve(module)
  })
}
// 编辑关注页面
const attentCompile = (resolve) => {
  import('@/components/base/attention/attent-compile/attent-compile').then((module) => {
    resolve(module)
  })
}
// 聊天室
const Chat = (resolve) => {
  import('@/components/base/chat/chat').then((module) => {
    resolve(module)
  })
}
// 导购聊天室
const crmChat = (resolve) => {
  import('@/components/base/crm-chat/crm-chat').then((module) => {
    resolve(module)
  })
}
// 订单导航
const OrderNavigate = (resolve) => {
  import('@/components/order-form/order-navigate').then((module) => {
    resolve(module)
  })
}
// 询价
const Biding = (resolve) => {
  import('@/components/order-form/biding/biding').then((module) => {
    resolve(module)
  })
}
// 询价支付页面
const Bidingpo = (resolve) => {
  import('@/components/order-form/biding/place-order/place-order').then((module) => {
    resolve(module)
  })
}
// 拼单
const CrowdOrder = (resolve) => {
  import('@/components/order-form/crowd-ordering/crowd-order').then((module) => {
    resolve(module)
  })
}
// // 拼单支付页面
// const CrowdOrderpo = (resolve) => {
//   import('@/components/order-form/crowd-ordering/place-order/place-order').then((module) => {
//     resolve(module)
//   })
// }

// 订单
const Orders = (resolve) => {
  import('@/components/order-form/orders/orders').then((module) => {
    resolve(module)
  })
}

// 确认询价
const ConfirmBidding = (resolve) => {
  import('@/components/filter/models-offer/confirm-bidding/confirm-bidding').then((module) => {
    resolve(module)
  })
}
// 确认拼单
const ConfirmCrowd = (resolve) => {
  import('@/components/filter/models-offer/confirm-crowd/confirm-crowd').then((module) => {
    resolve(module)
  })
}

// 拼单详情
const CrowdDetails = (resolve) => {
  import('@/components/order-form/crowd-details/crowd-details').then((module) => {
    resolve(module)
  })
}
// 询价详情
const LineItem = (resolve) => {
  import('@/components/order-form/line-item/line-item').then((module) => {
    resolve(module)
  })
}
// 订单详情
const orderDetails = (resolve) => {
  import('@/components/order-form/line-item/order-details').then((module) => {
    resolve(module)
  })
}

// 确认期货拼单
const AffirmCrowdorder = (resolve) => {
  import('@/components/order-form/affirm-crowdorder/affirm-crowdorder').then((module) => {
    resolve(module)
  })
}
// 设置页面
const Setting = (resolve) => {
  import('@/components/min/setting/set').then((module) => {
    resolve(module)
  })
}
// 绑定邮箱
const BindEmail = (resolve) => {
  import('@/components/min/auth/bindEmail').then((module) => {
    resolve(module)
  })
}
// 绑定手机号
const BindPhone = (resolve) => {
  import('@/components/min/auth/bindPhone').then((module) => {
    resolve(module)
  })
}
// 修改登录密码
const ModifiyLoginPassword = (resolve) => {
  import('@/components/min/auth/modifiyLoginPassword').then((module) => {
    resolve(module)
  })
}
// 修改手机号码
const ModifiyPhoneNumber = (resolve) => {
  import('@/components/min/auth/modifiyPhoneNumber').then((module) => {
    resolve(module)
  })
}
// 账户与安全
const Safety = (resolve) => {
  import('@/components/min/setting/safety/safety').then((module) => {
    resolve(module)
  })
}
// 消息中心
const MsgCenter = (resolve) => {
  import('@/components/min/msg-center/msg-center1').then((module) => {
    resolve(module)
  })
}

// 修改地址
const alterCityAddress = (resolve) => {
  import('@/components/min/user-msg/alterAdress/alterAdress').then((module) => {
    resolve(module)
  })
}
// // 测试页面
// const Test = (resolve) => {
//   import('@/components/test/test').then((module) => {
//     resolve(module)
//   })
// }
// 测试页面
/* const Ceshi = (resolve) => {
  import('@/components/test/ceshi').then((module) => {
    resolve(module)
  })
} */
// 优惠券
const CashCoupon = (resolve) => {
  import('@/components/min/cash-coupon/cash-coupon').then((module) => {
    resolve(module)
  })
}
// 个人资料
const UserMsg = (resolve) => {
  import('@/components/min/user-msg/user-msg').then((module) => {
    resolve(module)
  })
}
// 修改昵称
const AlterName = (resolve) => {
  import('@/components/min/user-msg/alterName/alterName').then((module) => {
    resolve(module)
  })
}

// 修改性别
const AlterSex = (resolve) => {
  import('@/components/min/user-msg/alterSex/alterSex').then((module) => {
    resolve(module)
  })
}
// // 修改昵称
// const PlaceOrder = (resolve) => {
//   import('@/components/order-form/place-order/place-order').then((module) => {
//     resolve(module)
//   })
// }
// 身份信息填写
const UserInfo = (resolve) => {
  import('@/components/filter/models-offer/user-info/user-info').then((module) => {
    resolve(module)
  })
}
// 测试关注页面分页
const Atn = (resolve) => {
  import('@/components/base/attention/atn').then((module) => {
    resolve(module)
  })
}
// 广告页
const Ad = (resolve) => {
  import('@/components/base/ad/ad').then((module) => {
    resolve(module)
  })
}

// 支付失败
const PayAgain = (resolve) => {
  import('@/components/order-form/pay-again/pay-again').then((module) => {
    resolve(module)
  })
}
// 资讯详情
const carInfoDetail = (resolve) =>{
  import('@/components/base/carInfo-detail/carInfo-detail').then((module) => {
    resolve(module)
  })
}
// 编辑消息
const msgCompile = (resolve) => {
  import('@/components/min/msg-center/msg-compile/msg-compile1').then((module) => {
    resolve(module)
  })
}

// 意见反馈
const Feedback = (resolve) => {
  import('@/components/min/feedback/index').then((module) => {
    resolve(module)
  })
}

// 其他车系
const otherCarSeriesList = (resolve) => {
  import('@/components/base/referrals/otherCarSeriesList').then((module) => {
    resolve(module)
  })
}

// 相关推荐
const referralsList = (resolve) => {
  import('@/components/base/referrals/referralsList').then((module) => {
    resolve(module)
  })
}

// 注册新用户
const newRegister = (resolve) => {
  import('@/components/min/auth/newRegister').then((module) => {
    resolve(module)
  })
}

// 申请退款
const applyDrawback = (resolve) => {
  import('@/components/order-form/apply-drawback/apply-drawback').then((module) => {
    resolve(module)
  })
}

// 红包外链界面
const vIframe = (resolve) => {
  import('@/components/base/v-iframe/v-iframe').then((module) => {
    resolve(module)
  })
}

const router = new Router({
  routes: [
    // 根路径
    {
      path: '/',
      redirect: '/ad',
      component: Ad,
      meta: {title: '首页', isShowHead: false, isShowFoot: true, isShowTitle: true}
    },
    // //测试
    // {
    //   path: '/test',
    //   name: 'test',
    //   component: Test,
    //   meta: {title: '测试页面', isShowHead: false, isShowFoot:true}
    // },
    // 测试
    /* {
      path: '/ceshi',
      name: 'ceshi',
      component: Ceshi,
      meta: { title: '测试', isShowHead: true, isShowFoot: true, isShowTitle: true}
    },  */
    // 首页
    {
      path: '/home',
      name: 'home',
      component: Home,
      meta: {title: '首页', isShowHead: false, isShowFoot: true, isShowTitle: true}
    },
    // 登录
    {
      path: '/login/',
      name: 'login',
      component: login,
      meta: { title: '登录注册', isShowHead: false, isShowFoot: false, isShowTitle: true}
    },
    //车城资讯
    {
      path: '/carInfo',
      component: CarInfo,
      meta: {title: '资讯', secondTitle: '车城资讯', isShowHead: true, isShowFoot: true, isShowBack: false, isShowTitle: false}
    },
    // 资讯详情
    {
      path: '/find',
      component: Find,
      meta: { title: '更多资讯', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    // 咨询内容
    {
      path: '/carInfoDetail',
      name: 'carInfoDetail',
      component: carInfoDetail,
      meta: { title: '资讯详情', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: false}
    },
    // 我的
    {
      path: '/min',
      component: Min,
      meta: { title: '我的', isShowHead: false, isShowFoot: true, isShowBack: false, isShowTitle: true}
    },
    // 订单导航
    {
      path: '/orderNavigate',
      redirect: '/orderNavigate/biding',
      component: OrderNavigate,    
      children: [
        // 询价
        {
          path: 'biding',
          name: 'biding',
          component: Biding,
          meta: {title: '订单', secondTitle: '询价', isShowHead: false, isShowFoot: true, isShowBack: false, isShowTitle: false}
        },
        // 拼单
        {
          path: 'crowdOrder',
          name: 'crowdOrder',
          component: CrowdOrder,
          meta: {title: '订单', secondTitle: '拼单', isShowHead: false, isShowFoot: true, isShowBack: false, isShowTitle: false}
        }, 
        // 订单
        {
          path: 'orders',
          name: 'orders',
          component: Orders,
          meta: {title: '订单', secondTitle: '订单', isShowHead: false, isShowFoot: true, isShowBack: false, isShowTitle: false}
        }
      ]
    }, 
    //再次支付
    {
      path: '/orderNavigate/payAgain',
      name:'payAgain',
      component: PayAgain,
      meta: { title: '支付方式', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: false}
    },
    // 询价支付页面
    {
      path: '/biding/placeOrder',
      name:'bidingPo',
      component: Bidingpo,
      meta: { title: '支付资源锁定金', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    // // 拼单支付页面
    // {
    //   path: '/orderNavigate/crowdOrder/placeOrder',
    //   name:'crowdOrderpo',
    //   component: CrowdOrderpo,
    //   meta: { title: '支付资源锁定金', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    // },
    // 下单
    // {
    //   path: '/placeOrder',
    //   name:'placeOrder',
    //   component: PlaceOrder,
    //   meta: { title: '支付资源锁定金', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    // },  
    // 询价详情
    {
      path: '/lineItem',
      name: 'lineItem',
      component: LineItem,
      meta: { title: '询价详情', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
      path: '/orderNavigate/orderDetails',
      name: 'orderDetails',
      component: orderDetails,
      meta: { title: '订单详情', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    // 转入期货拼单
    {
      path: '/crowdOrder/affirmCrowdorder',
      name: 'affirmCrowdorder',
      component: AffirmCrowdorder,
      meta: { title: '期货拼单', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    // 地图
    {
      path: '/maps/',
      component: Maps,
      meta: { title: '车城地址', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    // 关注车型
    {
      path:'/attention/',
      component: Attention,
      meta: { title: '关注车型', isShowHead: true, isShowFoot: true, isShowBack: false, isShowTitle: true }
    },
    // 
    {
      path: '/loanInfo',
      component: LoanInfo,
      meta: {title: '金融信息', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },   
    {
      path: '/loanInfoLook',
      component: LoanInfoLook,
      meta: {title: '金融信息', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },     
    // 新关注车型
    {
      path:'/attent/',
      component: Attent,
      meta: { title: '关注车型', isShowHead: false, isShowFoot: false, isShowBack: true, isShowClear: true, isShowTitle: true}
    },
     // 测试关注分页
    {
      path:'/atn',
      component: Atn,
      meta: { title: '关注分页', isShowHead: false, isShowFoot: false, isShowBack: true, isShowClear: true, isShowTitle: true}
    },
     // 编辑关注
    {
      path:'/attentCompile/',
      component: attentCompile,
      meta: { title: '编辑关注', isShowHead: false, isShowFoot: false, isShowBack: true, isShowClear: true, isShowTitle: true}
    },
    // 编辑消息中心
    {
      path: '/msgCompile',
      name: 'msgCompile',
      component: msgCompile,
      meta: { title: '编辑消息中心', isShowHead: false, isShowFoot: false, isShowBack: true, isShowClear: true, isShowTitle: true}
    },
    // 聊天室
    {
      path: '/chat/',
      name: 'chat',
      component: Chat,
      meta: { title: '在线客服', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    // 导购聊天室
    {
      path: '/crmChat',
      name: 'crmChat',
      component: crmChat,
      meta: { title: '在线导购', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    //设置
    {
      path: '/setting',
      name: 'setting',
      component: Setting,
      meta: { title: '设置', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },

    //账户与安全
    {
      path: '/safety',
      name: 'safety',
      component: Safety,
      meta: { title: '账户与安全', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    //消息中心
    {
      path: '/msgCenter',
      component: MsgCenter,
      meta: { title: '消息中心', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    //代金券
    
    {
      path: '/cashCoupon',
      component: CashCoupon,
      meta: { title: '现金券', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    //个人资料
    {
      path: '/userMsg',
      name:"userMsg",
      component: UserMsg,
      meta: { title: '个人资料', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    //修改昵称
    {
      path: '/alterName',
      component: AlterName,
      meta: { title: '修改昵称', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    //修改性别
    {
      path: '/alterSex',
      component: AlterSex,
      meta: { title: '修改性别', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    // 修改地址
    {
      path: '/alterCityAddress',
      component: alterCityAddress,
      meta: { title: '修改地址', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    //服务条款
    {
      path: '/confirmClause',
      name: 'confirmClause',
      component: ConfirmClause,
      meta: { title: '服务条款', isShowHead: true, isShowFoot: false, isShowBack: false, isShowTitle: true }
    },
    //服务条款
    {
      path: '/clause',
      component: Clause,
      meta: { title: '服务条款', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    // 意见反馈
    {
      path: '/feedback',
      name: 'feedback',
      component: Feedback,
      meta: { title: '意见反馈', isShowFoot: false }
    },
    {
      path: '/guide',
      component: Guide,
      meta: { title: '引导页', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: true}
    },
    {
    	path: '/about/',
    	component: About,
      meta: { title: '关于我们', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
    	path: '/oftenQuestion/',
    	component: OftenQuestion,
      meta: { title: '常见问题', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
    	path: '/aboutApp/',
    	component: AboutApp,
      meta: { title: '关于APP', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
    	path: '/aboutUpai/',
    	component: AboutUpai,
      meta: { title: '关于车城', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
    	path: '/ccrowdorder/',
    	component: Ccrowdorder,
      meta: { title: '关于拼单模式', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
    	path: '/loanClient/',
    	component: LoanClient,
      meta: { title: '贷款客户', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
    	path: '/bigBangClient/',
    	component: BigBangClient,
      meta: { title: '全款客户', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },


    {
    	path: '/aboutOur/',
    	component: AboutOur,
      meta: { title: '关于车城', isShowHead: true, isShowFoot: true, isShowBack: false, isShowTitle: true}
    },
    {
      path: '/brand',
      component: Brand,
      meta: { title: '选择品牌', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
      path: '/filter',
      name: 'filter',
      component: Filter,
      meta: {
        title: '选车',
        isShowHead: false,
        isShowFoot: true,
        isShowBack: false,
        isShowClear: true,
        isShowSousuo: true, 
        isShowTitle: true
      }
    },
    {
      path: '/carSeries',
      name: 'carSeries',
      component: CarSeries,
      meta: { title: '选择车系', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/carDetails',
      name: 'carDetails',
      component: CarDetailes,
      meta: { title: '车型配置', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/modelsOffer',
      name: 'modelsOffer',
      component: ModelsOffer,
      meta: {title: '车系报价', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: true}
    },
    {
      path: '/modelsOffer/otherCarSeriesList',
      component: otherCarSeriesList,
      meta: {title: '其他车系', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: false}
    },
    {
      path: '/modelsOffer/referralsList',
      component: referralsList,
      meta: {title: '相关推荐', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: false}
    },
    {
      path: '/modelsOffer/confirmBidding',
      name: 'confirmBidding',
      component: ConfirmBidding,
      meta: {title: '确认询价', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
      path: '/modelsOffer/confirmCrowd',
      name: 'confirmCrowd',
      component: ConfirmCrowd,
      meta: { title: '确认拼单', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/order-form/CrowdDetails/',
      name: 'crowdDetails',
      component: CrowdDetails,
      meta: { title: '拼单详情', isShowHead: false, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/search',
      component: Search,
      meta: { title: '搜索', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: true }
    },
    /* {
      path: '/ChoiceCity',
      component: ChoiceCity,
      meta: { title: '选择城市', isShowHead: true, isShowFoot: true, isShowBack: false, isShowTitle: true }
    }, */
    {
      path: '/forgetPassword',
      component: Forget,
      meta: { title: '找回密码', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/barCode',
      component: BarCode,
      meta: { title: '扫描二维码', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: true }
    },
    {
      path: '/bindEmail',
      component: BindEmail,
      meta: { title: '绑定邮箱', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/bindPhone',
      component: BindPhone,
      meta: { title: '绑定账户', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/newRegister',
      component: newRegister,
      meta: { title: '注册新用户', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/modifiyLoginPassword',
      component: ModifiyLoginPassword,
      meta: { title: '修改登录密码', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true}
    },
    {
      path: '/modifiyPhoneNumber',
      component: ModifiyPhoneNumber,
      meta: { title: '修改手机号码', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/modelsOffer/userInfo',
      component: UserInfo,
      meta: { title: '身份信息', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: true }
    },
    {
      path: '/Ad',
      component: Ad,
      meta: { title: '广告', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: false }
    },
    {
      path: '/orderNavigate/applyDrawback',
      name: 'applyDrawback',
      component: applyDrawback,
      meta: { title: '申请退款', isShowHead: true, isShowFoot: false, isShowBack: true, isShowTitle: true }
    },
    {
      path: '/vIframe/',
      name: 'vIframe',
      component: vIframe,
      meta: { title: '', isShowHead: false, isShowFoot: false, isShowBack: false, isShowTitle: false }
    }
  ]
})

router.afterEach(function(to,from) {
  var toL = to.path.split('/').length;
  var fromL = from.path.split('/').length;
  var trans;

  if (toL == fromL) {
    trans = 'fade'
  } /* else {
    trans = toL > fromL ? 'next': 'prev'
  } */
  if (to.meta.title) {
    store.dispatch("updateNavbarTitle", to.meta.title)
    // 过渡效果
    store.dispatch('updateTransition',trans)
    store.dispatch('updateNavbarStatus', { isShowHead: to.meta.isShowHead, isShowFoot: to.meta.isShowFoot, isShowBack: to.meta.isShowBack, isShowClear: to.meta.isShowClear,isShowSousuo: to.meta.isShowSousuo})			
    document.title = "环球汽车城-" + to.meta.title || ""
  }
  // 从modelsOffer去往filter页面时不执行created和mounted
  if (to.path === '/filter' && from.path === '/modelsOffer') {
    store.dispatch('updateCachePrevPageStatuts', true)
  }
})
export default router